package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CCP_SYS_USERLINK"
 *     
*/
public class CcpSysUserlink implements Serializable {

    /** identifier field */
    private String ulGuid;

    /** persistent field */
    private String ulUser;

    /** persistent field */
    private String ulLinkto;

    /** nullable persistent field */
    private String ulIsorg;

    /** nullable persistent field */
    private String sysOrder;

    /** full constructor */
    public CcpSysUserlink(String ulGuid, String ulUser, String ulLinkto, String ulIsorg, String sysOrder) {
        this.ulGuid = ulGuid;
        this.ulUser = ulUser;
        this.ulLinkto = ulLinkto;
        this.ulIsorg = ulIsorg;
        this.sysOrder = sysOrder;
    }

    /** default constructor */
    public CcpSysUserlink() {
    }

    /** minimal constructor */
    public CcpSysUserlink(String ulGuid, String ulUser, String ulLinkto) {
        this.ulGuid = ulGuid;
        this.ulUser = ulUser;
        this.ulLinkto = ulLinkto;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="UL_GUID"
     *         
     */
    public String getUlGuid() {
        return this.ulGuid;
    }

    public void setUlGuid(String ulGuid) {
        this.ulGuid = ulGuid;
    }

    /** 
     *            @hibernate.property
     *             column="UL_USER"
     *             length="32"
     *             not-null="true"
     *         
     */
    public String getUlUser() {
        return this.ulUser;
    }

    public void setUlUser(String ulUser) {
        this.ulUser = ulUser;
    }

    /** 
     *            @hibernate.property
     *             column="UL_LINKTO"
     *             length="32"
     *             not-null="true"
     *         
     */
    public String getUlLinkto() {
        return this.ulLinkto;
    }

    public void setUlLinkto(String ulLinkto) {
        this.ulLinkto = ulLinkto;
    }

    /** 
     *            @hibernate.property
     *             column="UL_ISORG"
     *             length="1"
     *         
     */
    public String getUlIsorg() {
        return this.ulIsorg;
    }

    public void setUlIsorg(String ulIsorg) {
        this.ulIsorg = ulIsorg;
    }

    /** 
     *            @hibernate.property
     *             column="SYS_ORDER"
     *             length="10"
     *         
     */
    public String getSysOrder() {
        return this.sysOrder;
    }

    public void setSysOrder(String sysOrder) {
        this.sysOrder = sysOrder;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("ulGuid", getUlGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CcpSysUserlink) ) return false;
        CcpSysUserlink castOther = (CcpSysUserlink) other;
        return new EqualsBuilder()
            .append(this.getUlGuid(), castOther.getUlGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getUlGuid())
            .toHashCode();
    }

}
